from django.contrib import admin
from pyplog.blog.models import *

class CategoryAdmin(admin.ModelAdmin):
	prepopulated_fields = { "slug" : ("title",) }
admin.site.register(Category, CategoryAdmin)

class PostAdmin(admin.ModelAdmin):
	date_hierarchy = "published"
	fieldsets = (
		(None, {
			"fields": ("title", "slug", "categories", "published", "author")
		}),
		("Content", {
			"fields": ("content", "content_markup")
		}),
	)
	list_display = ("title", "content_markup", "published")
	prepopulated_fields = { "slug" : ("title",) }
admin.site.register(Post, PostAdmin)